import { requestData } from "../utils/request.js";

//注册新用户
export const addColorUser = (data) => {
		return requestData({
			url: '/addUser',
			method: 'POST',
			data: data || {}
		})
	
}

//用户登录
export function loginColor(data){
		return requestData({
			url: '/login',
			method: 'POST',
			data: data || {}
		})
	
}

//计划列表
export function selectPlan(data){
	return requestData({
		url: "/selectPlan",
		method: "POST",
		data: data || {}
	})
}

//新增计划
export function addPlan(data){
	return requestData({
		url: "/addPlan",
		method: "POST",
		data: data || {}
	})
}

//打卡
export function clockIn(data){
	return requestData({
		url: "/clock",
		method: "POST",
		data: data || {}
	})
}

//搜索用户
export function searchUser(data){
	return requestData({
		url: "/searchUser",
		method: 'POST',
		data: data || {}
	})
}
//请求添加好友
export function addFriend(data) {
	return requestData({
		url: "/addFriend",
		method: "POST",
		data: data || {}
	})
}

// 同意添加好友
export function agreeRes(data) {
	return requestData({
		url: "/agreeRes",
		method: "POST",
		data: data || {}
	})
}

//拒绝添加好友
export function RefuseRes(data) {
	return requestData({
		url: "/RefuseRes",
		method: "POST",
		data: data || {}
	})
}

//查询是否有添加好友请求
export function selectFRes(data) {
	return requestData({
		url: "/selectFRes",
		method: "POST",
		data: data || {}
	})
}

//好友请求反馈
export function feedback(data) {
	return requestData({
		url: "/feedback",
		method: "POST",
		data: data || {}
	})
}

//好友信息已读
export function reRead(data) {
	return requestData({
		url: "/reRead",
		method: "POST",
		data: data || {}
	})
}

//获取好友数据
export function selectFriend(data) {
	return requestData({
		url: "/selectFriend",
		method: "POST",
		data: data || {}
	})
}

//获取导航数据
export function selectMenu(){
	return requestData({
		url: "/selectMenu",
		method: "POST",
		data: {}
	})
}

//获取用户信息
export function selectUsers(data){
	return requestData({
		url: "/selectUsers",
		method: "POST",
		data: data
	})
}

//用户信息修改
export function UpdateUsers(data){
	return requestData({
		url: "/UpdateUsers",
		method: "POST",
		data: data
	})
}

//查询所有计划
export function selectAllPlan(data){
	return requestData({
		url: "/selectAllPlan",
		method: "POST",
		data: data
	})
}

//查询今日所有打卡
export function selectTodayClock(data){
	return requestData({
		url: "/selectTodayClock",
		method: "POST",
		data: data
	})
}

//查询一周所有打卡
export function selectWeeklyClock(data){
	return requestData({
		url: "/selectWeeklyClock",
		method: "POST",
		data: data
	})
}

//查询一周所有打卡
export function UpdateIntegral(data){
	return requestData({
		url: "/UpdateIntegral",
		method: "POST",
		data: data
	})
}

//查询用户积分
export function selectAllUser(data){
	return requestData({
		url: "/selectAllUser",
		method: "POST",
		data: data || {}
	})
}

//查询团队计划
export function selectTodayAllClock(data){
	return requestData({
		url: "/selectTodayAllClock",
		method: "POST",
		data: data || {}
	})
}

//获取宝藏信息
export function selecTreasure(data){
	return requestData({
		url: "/selecTreasure",
		method: "POST",
		data: data || {}
	})
}

//今日签到查询
export function selectTodayS(data){
	return requestData({
		url: "/selectTodayS",
		method: "POST",
		data: data || {}
	})
}

//查询用户所有签到
export function selectAllAdd(data){
	return requestData({
		url: "/selectAllAdd",
		method: "POST",
		data: data || {}
	})
}

//签到
export function today(data){
	return requestData({
		url: "/today",
		method: "POST",
		data: data || {}
	})
}

//删除计划
export function deletePlan(data){
	return requestData({
		url: "/deletePlan",
		method: "POST",
		data: data || {}
	})
}

//更新勋章
export function UpdateMedal(data){
	return requestData({
		url: "/UpdateMedal",
		method: "POST",
		data: data || {}
	})
}

//发送提醒
export function chatSend(data){
	return requestData({
		url: "/chatSend",
		method: "POST",
		data: data || {}
	})
}

//更新提醒
export function updateChat(data){
	return requestData({
		url: "/updateChat",
		method: "POST",
		data: data || {}
	})
}

//查询未读提醒
export function selectChat(data){
	return requestData({
		url: "/selectChat",
		method: "POST",
		data: data || {}
	})
}